package com.example.swaggerproject.mapper.impl;

import com.example.swaggerproject.entity.Book;
import com.example.swaggerproject.mapper.BookMapper;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.List;

@Component
public class BookMapperImpl implements BookMapper {

    @Override
    public Book findById(Long id) {
        return new Book(id, "Spring Boot 3.0", 99.9);
    }

    @Override
    public Collection<Book> findAll() {
        return List.of(new Book(1L, "Spring Boot 3.0", 99.9),
                new Book(2L, "Spring Boot 3.0", 99.9),
                new Book(3L, "Spring Boot 3.0", 99.9));
    }

}
